﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GraphAlgorithms {
	public class Vertex : IComparable {

		public Vertex() {
            _edges = new List<Edge>();
        }

		public Vertex(string name) {
			_name = name;
            _edges = new List<Edge>();
		}

		public Vertex(string name, int index) {
			_name = name;
			_index = index;
            _edges = new List<Edge>();
		}

        private List<Edge> _edges;
        public List<Edge> Edges {
            get { return _edges; }
            set { _edges = value; }
        }

		private string _name;
		public string Name {
			get { return _name; }
			set { _name = value; }
		}

		public enum color {
			WHITE, GRAY, BLACK,
		}

		private Vertex _parent;
		public Vertex Parent {
			get { return _parent; }
			set { _parent = value; }
		}

		private color _color;
		public color Color {
			get { return _color; }
			set { _color = value; }
		}

		private int _depth;
		public int Depth {
			get { return _depth; }
			set { _depth = value; }
		}

		private int _discoveryTime;
		public int DiscoveryTime {
			get { return _discoveryTime; }
			set { _discoveryTime = value; }
		}

		private int _finishTime;
		public int FinishTime {
			get { return _finishTime; }
			set { _finishTime = value; }
		}

		private double _distance = 0;
		public double Distance {
			get { return _distance; }
			set { _distance = value; }
		}

		private double _key = 0;
		public double Key {
			get { return _key; }
			set { _key = value; }
		}

		private int _index = 0;
		public int Index {
			get { return _index; }
			set { _index = value; }
		}

		private int _rank = 0;
		public int Rank {
			get { return _rank; }
			set { _rank = value; }
		}

		private bool _marked = false;
		public bool Marked {
			get { return _marked; }
			set { _marked = value; }
		}

		public int CompareTo(object e) {
			return this.Name.CompareTo(((Vertex)e).Name);
		}
	}
}
